﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Media.Capture;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234237

namespace JumpstartApp.Views
{
    using JumpstartApp.Helpers;

    /// <summary>
    /// A basic page that provides characteristics common to most applications.
    /// </summary>
    public sealed partial class Camera : LayoutAwarePage
    {
        public Camera()
        {
            this.InitializeComponent();
            Loaded += Camera_Loaded;
        }

        async void Camera_Loaded(object sender, RoutedEventArgs e)
        {
            var _ViewModel = this.DataContext as ViewModels.CameraViewModel;
            await _ViewModel.Start(MyCaptureElement);
        }
    }
}
